package com.qf.controller;

import com.qf.entity.Goods;

import com.qf.service.SearchService;
import com.qf.vo.Param;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.io.IOException;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: 你的名字
 * @Date: 2021/07/13/18:46
 * @Description:
 */
@Controller
@RequestMapping("/searchGoodsController")
public class searchController {
@Autowired
    private SearchService searchService;
    @RequestMapping("/search")
    public String  searchGoods(Param param, ModelMap modelMap) throws IOException {
        List<Goods> goodsList = searchService.getGoodsList(param);
        modelMap.put("goodsList",goodsList);
        return "SearchList";

    }

}
